home *** CD-ROM | disk | FTP | other *** search
- Path: comma.rhein.de!serpens!not-for-mail
- From: mlelstv@serpens.rhein.de (Michael van Elst)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Demo/game to OS friendly part II
- Date: 8 Feb 1996 11:41:43 +0100
- Organization: dis-
- Message-ID: <4fck17$3v1@serpens.rhein.de>
- References: <3118bf29@gauss.demon.co.uk>
- NNTP-Posting-Host: serpens.rhein.de
-
- Andrew Bennett <ben@gauss.demon.co.uk> writes:
-
- > What exactly does InitBitmap() do ??
-
- It initializes a bitmap structure according to the values you pass to it.
-
- _Currently_ that means that it just pokes the values into the structure
- and clears unused fields.
-
- > I simply allocate the correct amount of chipmem using AllocMem,calculate the
- >bitplane addresses then bung them into a BitMap structure.
-
- That's what you still have to do.
-
- > Then I open an intuition screen with a custom bitmap. Is there anything
- >"wrong" with this method ? Is this liable to fail in a future OS ?
-
- Oh, this already fails with the current OS if you happen to have AGA.
-
- There are two legal methods to generate a bitmap:
-
- struct BitMap BM;
-
- InitBitMap(&BM, depth, width, height);
- for (i=0; i<depth; ++i)
- BM.Planes[i] = some_chip_mem;
-
- and
-
- struct BitMap *bm;
-
- bm = AllocBitMap(width, height, depth, flags, friend_bitmap);
-
- The first kind of bitmap is sufficient for any rendering operation but might be slower
- than necessary. It does not necessarily work for a display bitmap and it doesn't
- support interleaved bitmaps. It is also limited to eight bitplanes.
-
- The second kind of bitmap can be used for display and you might pass a pointer to another
- bitmap so that blits between both maps are as efficient as possible. This kind of bitmap
- can be of arbitrary structure and you must not access any fields in the structure. You
- can use the GetBitMapAttr() function to query some attributes. One attribute is a flag
- that tells you wether the bitmap is "standard". If it is "standard" then bm points to a standard
- BitMap structure with valid Plane pointers.
-
- Regards,
- --
- Michael van Elst
-
- Internet: mlelstv@serpens.rhein.de
- "A potential Snark may lurk in every tree."
-